/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hibernate;

import hibernate.exception.BussinessException;
import java.io.Serializable;
import java.util.List;

/**
 *
 * @param <T> 
 * @param <ID> 
 * @author ariel
 */
public interface GenericDAO<T,ID extends Serializable> {
     /**
     *
     * @return
     * @throws BussinessException
     */
    void create(T entity) throws BussinessException;
     /**
     *
     * @param entity
     * @throws BussinessException
     */
    void saveOrUpdate(T entity) throws BussinessException;
     /**
     *
     * @param id
     * @return
     * @throws BussinessException
     */
    T get(ID id) throws BussinessException;
     /**
     *
     * @param id
     * @throws BussinessException
     */
    void delete(ID id) throws BussinessException;
     /**
     *
     * @return
     * @throws BussinessException
     */
    List<T> findAll() throws BussinessException;
    
    //List<T> buscar(ID id) throws BussinessException;
 }
